/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author User
 */
import java.net.*;

import java.io.*;

class localURL {

    public static void main(String args[]) throws Exception {

        int c;

        //URL hp = new URL("http", "127.0.0.1", 80, "/");
        
        URL hp = new URL("http://10.1.108.13:3060/skyrise/reports/RC000007RP.jsp?unfold=0&active=0&emp=0&empb=0&strcl=0&excel=0&flag=1&branch=*&level=B&links=0&statname=RC000007RP.jsp&bank=PB&ru=*&fl=*&brnm=*&tobo=0&groupf=*&bus=4&project=F&cardtype=00&ccy=ALL&platform=0&cobrand=6&repay=0&sort=2&basis=0&periods=0&activetobo=on&excludedMainOffice=on&ldapfromsite=dn120188tpj&directlink=1&isxml=1&day1=16&month1=05&year1=2012&day2=16&month2=05&year2=2012");
        

        URLConnection hpCon = hp.openConnection();

        System.out.println("Date: " + hpCon.getDate());

        System.out.println("Type: " + hpCon.getContentType());

        System.out.println("Exp: " + hpCon.getExpiration());

        System.out.println("Last M: " + hpCon.getLastModified());

        System.out.println("Length: " + hpCon.getContentLength());

        if (hpCon.getContentLength() > 0) {

            System.out.println("=== Content ===");

            InputStream input = hpCon.getInputStream();

            int i = hpCon.getContentLength();

            while (((c = input.read()) != -1) && (--i > 0)) {

                System.out.print((char) c);

            }

            input.close();

        } else {

            System.out.println("No Content Available");

        }

    }
}
